package br.entity;

import java.util.ArrayList;
import java.util.List;

public class User {
    private String name;
    private String password;
    private List<Good> purchasedGoods;
    public User() {
    }

    public User(String name, String password) {
        this.name = name;
        this.password = password;
        this.purchasedGoods = new ArrayList<>();
    }

    public List<Good> getPurchasedGoods() {
        return purchasedGoods;
    }

    public void setPurchasedGoods(List<Good> purchasedGoods) {
        this.purchasedGoods = purchasedGoods;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public  void Menu(){
        System.out.println("*****亲爱的"+this.name+"您好！*****");
        System.out.println("     1.查看商城");
        System.out.println("     2.查看我购买的商品");
        System.out.println("     3.退出登录");
        System.out.println("***********************");
        System.out.println("请选择你需要操作：");
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
